package com.kaishengit.pojo;


import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "t_user")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class User {

	private String id;
	private String username;
	private String password;
	private String pic;
	
	private Set<Role> roleList;
	private Set<News> newsList;
	private Set<Filetype> filetypeList;
	private Set<Goal> goalList;
	private Set<Idea> ideaList;
	private Set<Linkrecord> linkrecordList;
	private Set<Document> documentList;
	private Set<Files> fileList;
	private Set<Ideacomment> ideacommentList;
	private Set<Task> taskList;
	
	

	@Id
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	
	
	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	@OneToMany(mappedBy = "user")
	public Set<Role> getRoleList() {
		return roleList;
	}

	public void setRoleList(Set<Role> roleList) {
		this.roleList = roleList;
	}

	@ManyToMany(mappedBy="userList")
	public Set<News> getNewsList() {
		return newsList;
	}

	public void setNewsList(Set<News> newsList) {
		this.newsList = newsList;
	}

	@OneToMany(mappedBy="user")
	public Set<Filetype> getFiletypeList() {
		return filetypeList;
	}

	public void setFiletypeList(Set<Filetype> filetypeList) {
		this.filetypeList = filetypeList;
	}

	@OneToMany(mappedBy="user")
	public Set<Goal> getGoalList() {
		return goalList;
	}

	public void setGoalList(Set<Goal> goalList) {
		this.goalList = goalList;
	}

	@OneToMany(mappedBy="user")
	public Set<Idea> getIdeaList() {
		return ideaList;
	}

	public void setIdeaList(Set<Idea> ideaList) {
		this.ideaList = ideaList;
	}

	@OneToMany(mappedBy="user")
	public Set<Linkrecord> getLinkrecordList() {
		return linkrecordList;
	}

	public void setLinkrecordList(Set<Linkrecord> linkrecordList) {
		this.linkrecordList = linkrecordList;
	}

	@OneToMany(mappedBy="user")
	public Set<Document> getDocumentList() {
		return documentList;
	}

	public void setDocumentList(Set<Document> documentList) {
		this.documentList = documentList;
	}

	@OneToMany(mappedBy="user")
	public Set<Files> getFileList() {
		return fileList;
	}

	public void setFileList(Set<Files> fileList) {
		this.fileList = fileList;
	}

	@OneToMany(mappedBy="user")
	public Set<Ideacomment> getIdeacommentList() {
		return ideacommentList;
	}

	public void setIdeacommentList(Set<Ideacomment> ideacommentList) {
		this.ideacommentList = ideacommentList;
	}

	@OneToMany(mappedBy="user")
	public Set<Task> getTaskList() {
		return taskList;
	}

	public void setTaskList(Set<Task> taskList) {
		this.taskList = taskList;
	}

	
	
	
}
